//
//  ThreeProCell.m
//  BeautyClother
//
//  Created by dllo on 15/10/6.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "ThreeProCell.h"

@implementation ThreeProCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.image = [[UIImageView alloc] init];
        [self.contentView addSubview:_image];
        [_image release];
        
        self.name = [[UILabel alloc] init];
        [self.contentView addSubview:_name];
        [_name release];
        
        self.intro = [[UILabel alloc] init];
        [self.contentView addSubview:_intro];
        [_intro release];
    
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat offheight = [UIScreen mainScreen].bounds.size.height / 667;
    
    CGFloat offwidth = [UIScreen mainScreen].bounds.size.width / 375;
    
    self.image.frame = CGRectMake(5, 5, 80 * offwidth, self.contentView.frame.size.height - 10);
    
    self.name.frame = CGRectMake(self.image.frame.size.width + self.image.frame.origin.x + 10 * offwidth, 5, self.contentView.frame.size.width - 80 * offwidth, 60 * offheight);
    
    self.intro.frame = CGRectMake(self.image.frame.size.width + self.image.frame.origin.x + 10 * offwidth, 60 * offheight , 100 * offwidth, 40 * offheight);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
